package com.learn.ioc.configuration;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("com.learn.ioc.component")
public class MyConfiguration {

    // @Bean注解相当于XML配置文件中的bean标签
    // @Bean注解标记的方法的返回值会被放入IOC容器
    // @Bean
    // public CommonComponent getCommonComponent() {
    //     CommonComponent commonComponent = new CommonComponent();
    //     commonComponent.setComponentName("created by annotation config");
    //     return commonComponent;
    // }
}
